<?php
class BaseObj {
	public $Created = null;
	public $Modified = null;
	
	public function __construct() { 
		$Created = new DateTime();
		$Modified = new DateTime();
	}

	public function createdStr($sec=TRUE) { 
		return ($this->dateAsString($this->Created, $sec));
	} 

	public function dateAsString($date, $sec = TRUE) {
		if($sec)
			return $date->format("d-M-Y h:i:s A");
		else
			return $date->format("d-M-Y h:i A");
	}
	
	public function modifiedStr($sec=TRUE) { 
		return ($this->dateAsString($this->Modified, $sec));
	}
	
	public function nowStr() { 
		$d = new DateTime();
		return ($this->dateAsString($d));
	}
}
?>